@page
@model ITAM.Pages.Assets.AddDeviceModel
@{
    ViewData["Title"] = "新增设备";
}

<div class="row pr-3 pt-3 pl-3">
    <h5>新增设备</h5>
    <small class="pt-2px pl-1">新增表单</small>
</div>

<div class="row pr-3 pl-3">
    <div class="col-md-4 offset-md-4 pt-3">
        <form method="POST">
            <fieldset>
                <div class="form-group">
                    <label asp-for="DeviceRecord.AssetNumber" class="form-label mt-4">*设备资产编号</label>
                    <input asp-for="DeviceRecord.AssetNumber" class="form-control" placeholder="输入设备资产编号">
                    <span asp-validation-for="DeviceRecord.AssetNumber" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="DeviceRecord.CategoryId" class="form-label mt-4">*设备类型</label>
                    <select asp-for="DeviceRecord.CategoryId" asp-items="@Model.DeviceCategories" class="form-select">
                        <option value="">-- 选择设备类型 --</option>
                    </select>
                    <span asp-validation-for="DeviceRecord.CategoryId" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="DeviceRecord.VendorId" class="form-label mt-4">*厂商</label>
                    <select asp-for="DeviceRecord.VendorId" asp-items="@Model.Vendors" class="form-select">
                        <option value="">-- 选择厂商 --</option>
                    </select>
                    <span asp-validation-for="DeviceRecord.VendorId" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="DeviceRecord.PurchaseChannelId" class="form-label mt-4">购买渠道</label>
                    <select asp-for="DeviceRecord.PurchaseChannelId" asp-items="@Model.PurchasedChannels"
                        class="form-select">
                        <option value="">-- 选择购买渠道 --</option>
                    </select>
                </div>
                <div class="form-group">
                    <label asp-for="DeviceRecord.DepreciationRuleId" class="form-label mt-4">折旧规则</label>
                    <select asp-for="DeviceRecord.DepreciationRuleId" asp-items="@Model.DepreciationRules"
                        class="form-select">
                        <option value="">-- 选择折旧规则 --</option>
                    </select>
                </div>
                <div class="form-group">
                    <label asp-for="DeviceRecord.Description" class="form-label mt-4">描述</label>
                    <textarea asp-for="DeviceRecord.Description" class="form-control" rows="3"></textarea>
                </div>
                <button type="submit" class="btn btn-primary mt-4">确认新增</button>
            </fieldset>
        </form>
    </div>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}